← Back to issue list

Snapcraft does not list keys reported from snapd via External Key Manager

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1996618
Type
issue
State
open
Author
~bugraaydogar
Labels
craft-1804
Created
2022-11-15 14:47:34.215475+00:00
Updated
2023-06-13 17:02:57.267118+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Hi Snapcraft Team, snapcraft does not report the keys that are coming from the snapd if the account has no keys created and registered before. When using my own account, I'm able to see the keys that are created and registered; ``` bugraaydogar@aydogar-ws:~$ snapcraft list-keys Name SHA3-384 fingerprint * uc-signing-key aaa * serial bbb * model ccc - bugra-serial ddd (not registered) - bugra-model eee (not registered) ``` The snapd also returns the mentioned keys above; ``` bugraaydogar@aydogar-ws:~$ snap keys Name SHA3-384 uc-signing-key aaa serial bbb model ccc bugra-serial ddd bugra-model eee ``` After definition of the SNAPD_EXT_KEYMGR, I can fetch the following keys from the external key manager via snapd; ``` bugraaydogar@aydogar-ws:~$ snap keys Name SHA3-384 ubuntu-core-model zzz ubuntu-core-model-prod2 yyy ubuntu-core-model-prod xxx ``` I can also see the output of the snapcraft list-keys. ``` bugraaydogar@aydogar-ws:~/$ snapcraft list-keys Name SHA3-384 fingerprint - ubuntu-core-model zzz (not registered) - ubuntu-core-model-prod2 yyy (not registered) - ubuntu-core-model-prod xxx (not registered) ``` However if there is an account with no keys registered previously, it does not report anything; ``` $ snapcraft list-keys No keys have been registered. See 'snapcraft register-key --help' to register a key. ``` I think this is due to the following code; https://github.com/snapcore/snapcraft/blob/main/snapcraft_legacy/_store.py#L442 I think, we should also cover the case where there is no keys registered to the store but snapd provides the keys. Thanks, Bugra

Evaluation history

No evaluation history available.